﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ViewOrderByRes.aspx.cs" Inherits="ViewOrderByRes" Title="查看餐馆订单" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Main" runat="Server">
    <table style="width: 100%">
        <tr>
            <td>
                <asp:DropDownList ID="dpl_Res" runat="server" AutoPostBack="True" DataSourceID="ADS_Res"
                    DataTextField="R_sName" DataValueField="R_nID">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gdv_ResOrder" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ord_nID" DataSourceID="ADS_ResOrder" ForeColor="#333333" GridLines="None">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundField DataField="ord_nID" HeaderText="编号" InsertVisible="False" ReadOnly="True"
                            SortExpression="ord_nID" />
                        <asp:BoundField DataField="ord_nUserID" HeaderText="用户号" SortExpression="ord_nUserID" />
                        <asp:BoundField DataField="U_sName" HeaderText="客户名" SortExpression="U_sName" />
                        <asp:BoundField DataField="ord_dtBookTime" HeaderText="下订单时间" SortExpression="ord_dtBookTime" />
                        <asp:BoundField DataField="ord_dtArrivalTime" HeaderText="就餐时间" SortExpression="ord_dtArrivalTime" />
                        <asp:BoundField DataField="ord_nTableNum" HeaderText="餐桌数" SortExpression="ord_nTableNum" />
                        <asp:BoundField DataField="ord_sDesc" HeaderText="客户需求" SortExpression="ord_sDesc" />
                    </Columns>
                    <RowStyle BackColor="#EFF3FB" />
                    <EditRowStyle BackColor="#2461BF" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                <asp:AccessDataSource ID="ADS_ResOrder" runat="server" DataFile="~/App_Data/DB_NCI5.mdb"
                    SelectCommand="SELECT OrderRecord.ord_nID, OrderRecord.ord_nUserID, OrderRecord.ord_sName, OrderRecord.ord_dtBookTime, OrderRecord.ord_dtArrivalTime, OrderRecord.ord_nTableNum, OrderRecord.ord_nState, OrderRecord.ord_sDesc, [User].U_sName FROM (OrderRecord INNER JOIN [User] ON OrderRecord.ord_nUserID = [User].U_nID) WHERE (OrderRecord.ord_nState = ?) ORDER BY OrderRecord.ord_dtArrivalTime">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="dpl_Res" Name="ord_nState" PropertyName="SelectedValue"
                            Type="Int32" DefaultValue="1" />
                    </SelectParameters>
                </asp:AccessDataSource>
                <asp:AccessDataSource ID="ADS_Res" runat="server" DataFile="~/App_Data/DB_NCI5.mdb"
                    SelectCommand="SELECT [R_sName], [R_nID] FROM [Restaurant]"></asp:AccessDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
